package ru.ifmo.rybakov.muclumon;

import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;

@Entity
@DiscriminatorValue("N")
public class NumericValue extends PropertyValue {
	
	@Column(name = "numeric_value", nullable = false)
	private Double value;

	public NumericValue(Property property, Integer value) {
		setProperty(property);
		this.value = Double.valueOf(value);
	}
	
	public NumericValue(Property property, Double value) {
		setProperty(property);
		this.value = value;
	}
	
	protected NumericValue() {}
	
	/**
	 * @return the value
	 */
	public Double getValue() {
		return value;
	}

	/**
	 * @param value the value to set
	 */
	public void setValue(Double value) {
		this.value = value;
	}
}
